import javax.swing.*;
import java.awt.*;

public class Exercise_2 extends JFrame {
	public Exercise_2() {
		add(new newPanel()); 
	}

	class newPanel extends JPanel { 
		protected void paintComponent(Graphics g) {
			super.paintComponent(g);
			for(int i=10;i<200;i+=15){
				g.drawOval(i, i, 400-2*i, 400-2*i);
			}
		}
	}

	public static void main(String[] args) {
		JFrame f = new Exercise_2();
		f.setTitle("Exercise_2");//Create a frame
		f.setLocationRelativeTo(null);//New since JDK 1.4
		f.setSize(420, 440);//Set the frame size
		f.setVisible(true);//Display the frame
		f.setDefaultCloseOperation(EXIT_ON_CLOSE); 
	}
}